#include "PhysicsBall.h"
#include "OpenGL.h"
PhysicsBall::PhysicsBall(float _radius){
	radius = _radius;
}
void PhysicsBall::renderInternal(){
	glutSolidSphere(radius,20,20);
}
float PhysicsBall::inertia(){
	return 2.0f/5.0f * getMass() * radius;
}
OBoundingBox PhysicsBall::getOBoundingBox(){
	OBoundingBox ret;
	ret.position = current.position;
	ret.orientation = current.orientation;
	const float r2 = 2.0f*radius;
	ret.extents = PhysicsVector(r2,r2,r2);
	return ret;
}
float PhysicsBall::getBoundingSphere(){
	return radius;
}
